/**
 * 读取用户组的数据
 */

Ext.define('js.store.user.UserDepartment', {
    extend: 'Ext.data.Store',
    requires: ['js.Util'],
    autoLoad: true,
    defaultRootId: '0',
    nodeParam: 'department_id',
    root: {department_name: '全部', expanded: true},
    proxy: {
        type: 'ajax',
        url: 'publicUserManagementRoutes',
        extraParams: {
            action_type: 'userDepartmentQuery'
        },
        reader: {
            type: 'json',
            rootProperty: 'data', // 读取data属性
            transform: util.transform
        }
    }
});